* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* 导航栏样式 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 15px 30px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand:hover {
    color: #667eea;
    text-decoration: none;
}

.navbar-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    text-decoration: none;
    transform: translateY(-1px);
}

.nav-link.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.15);
    font-weight: 600;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    position: relative;
}

.address-selector {
    min-width: 250px;
    max-width: 350px;
    flex: 1;
}

.address-item {
    padding: 8px 12px;
}

.address-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.address-detail {
    color: #666;
    font-size: 12px;
    margin-top: 4px;
}

.header-title {
    text-align: center;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
}

.search-input {
    min-width: 300px;
    flex: 1;
    max-width: 400px;
}

.sort-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.store-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.store-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.store-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.store-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.store-image img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
}

.store-info {
    flex: 1;
    min-width: 0;
}

.store-name {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.new-badge {
    background: linear-gradient(45deg, #ff6b6b, #ff8e53);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: normal;
}

.platform-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 8px;
}

.platform-meituan {
    background: #ffd93d;
    color: #333;
}

.platform-eleme {
    background: #0078ff;
    color: white;
}

.platform-jd {
    background: #e93323;
    color: white;
}

.store-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
    margin-top: 12px;
    font-size: 14px;
    color: #666;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-icon {
    font-size: 16px;
    width: 20px;
}

.highlight {
    color: #e74c3c;
    font-weight: 600;
}

.success {
    color: #27ae60;
    font-weight: 600;
}

/* 剩余数量为0时的特殊样式 */
.zero-stock {
    color: #ff4757 !important;
    font-weight: 700;
}

.store-card.sold-out {
    position: relative;
}

/* 售罄时只对门店信息区域应用置灰效果，保持操作按钮的正常显示 */
.store-card.sold-out .store-image,
.store-card.sold-out .store-info {
    opacity: 0.6;
    filter: grayscale(0.3);
}

.store-card.sold-out .store-name {
    color: #999;
}

.store-card.sold-out .store-details {
    color: #999;
}

/* 确保操作按钮在售罄时保持正常的可点击外观 */
.store-card.sold-out .store-actions {
    opacity: 1;
    filter: none;
}

.store-card.sold-out .store-actions .action-button {
    opacity: 1;
    filter: none;
}



.store-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.action-button {
    min-width: 80px;
    width: 80px; /* 固定宽度，保持一致 */
}

.loading-container {
    text-align: center;
    padding: 40px;
}

.loading-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #409eff;
    font-size: 16px;
    font-weight: 500;
}

.loading-content i {
    font-size: 18px;
    animation: rotating 1s linear infinite;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-icon {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .navbar {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
    .navbar-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .header {
        padding: 20px;
    }
    
    .header-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .search-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input {
        min-width: auto;
        max-width: none;
    }
    
    .sort-buttons {
        justify-content: center;
    }
    
    .content {
        padding: 20px;
    }
    
    .store-item {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .store-image {
        width: 60px;
        height: 60px;
        align-self: center;
    }
    
    .store-details {
        grid-template-columns: 1fr;
    }
    
    .store-actions {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .action-button {
        flex: 1;
        min-width: 70px;
        max-width: 80px; /* 限制最大宽度，保持一致 */
    }
}

@media (max-width: 480px) {
    .store-card {
        padding: 15px;
    }
    
    .store-name {
        font-size: 16px;
    }
    
    .store-details {
        font-size: 13px;
    }
}

/* 无限滚动容器样式 */
.scroll-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    padding: 20px;
    background: rgba(249, 250, 251, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(5px);
}

/* 加载更多状态 */
.loading-more {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #409eff;
    font-size: 14px;
    font-weight: 500;
    padding: 15px 25px;
    background: rgba(64, 158, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(64, 158, 255, 0.2);
    animation: loadingPulse 1.5s infinite;
    box-shadow: 0 2px 8px rgba(64, 158, 255, 0.1);
}

.loading-more i {
    font-size: 16px;
    animation: rotating 1s linear infinite;
}

/* 无更多数据状态 */
.no-more-data {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #67c23a;
    font-size: 14px;
    font-weight: 500;
    padding: 15px 25px;
    background: rgba(103, 194, 58, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(103, 194, 58, 0.2);
    box-shadow: 0 2px 8px rgba(103, 194, 58, 0.1);
}

.no-more-data i {
    font-size: 16px;
    color: #67c23a;
}

/* 加载触发器样式 */
.load-more-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #909399;
    font-size: 14px;
    font-weight: 500;
    padding: 15px 25px;
    background: rgba(144, 147, 153, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(144, 147, 153, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 50px;
}

.load-more-trigger:hover {
    color: #409eff;
    background: rgba(64, 158, 255, 0.1);
    border-color: rgba(64, 158, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.15);
}

.load-more-trigger::after {
    content: "↓";
    margin-left: 8px;
    font-size: 16px;
    animation: bounce 2s infinite;
    color: inherit;
}

/* 分页信息样式 */
.pagination-info {
    color: #666;
    font-size: 14px;
    text-align: center;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(3px);
    font-weight: 500;
}

/* 动画效果 */
@keyframes loadingPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

@keyframes rotating {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .scroll-loading-container {
        padding: 15px;
        margin-top: 20px;
    }
    
    .loading-more,
    .no-more-data,
    .load-more-trigger {
        padding: 12px 20px;
        font-size: 13px;
    }
    
    .pagination-info {
        font-size: 13px;
        padding: 6px 12px;
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bounce-in {
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 通知配置对话框样式 */
.notify-config-dialog {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* 防止 dialog 出现横向和纵向滚动条 */
.notify-config-dialog .el-dialog {
    overflow: hidden !important;
    max-width: 95vw !important;
    box-sizing: border-box;
}

.notify-config-dialog .el-dialog__wrapper {
    overflow: hidden !important;
}

.notify-config-dialog .el-dialog__header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 18px;
    text-align: center;
    border-bottom: none;
}

.notify-config-dialog .el-dialog__title {
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.notify-config-dialog .el-dialog__headerbtn {
    top: 12px;
    right: 18px;
}

.notify-config-dialog .el-dialog__headerbtn .el-dialog__close {
    color: white;
    font-size: 16px;
}

.notify-config-dialog .el-dialog__body {
    max-height: 45vh;
    overflow: hidden;
    padding: 14px 16px;
    background: #fff;
}

.notify-config-dialog .el-dialog__footer {
    padding: 12px 18px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
}

/* 对话框内容样式 */
.dialog-content {
    max-height: none;
    overflow: visible;
}

/* 门店预览样式 */
.store-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 6px;
    margin-bottom: 12px;
    border: 1px solid #e3e6ea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.store-preview-icon {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.store-preview-icon img {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    object-fit: cover;
}

.store-preview-info {
    flex: 1;
}

.store-preview-name {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 3px;
}

.store-preview-detail {
    font-size: 13px;
    color: #666;
}

/* 配置表单样式 */
.config-form .el-form-item {
    margin-bottom: 15px;
}

.config-form .el-form-item__label {
    padding-bottom: 8px !important;
}

.config-form .el-form-item__label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

/* Element UI 单选按钮内置样式覆盖 */
.radio-option .el-radio {
    line-height: 1 !important;
    margin-bottom: 0 !important;
    display: flex !important;
    align-items: flex-start !important;
    width: 100% !important;
}

.radio-option .el-radio__label {
    padding-left: 0px !important;
    line-height: 1.2 !important;
    font-size: 14px !important;
    width: 100% !important;
    margin-left: 0 !important;
}

.radio-option .el-radio__input {
    line-height: 1.2 !important;
    vertical-align: top !important;
    margin-top: 1px !important;
    /* 隐藏默认的radio圆圈样式 */
    display: none !important;
}

/* 完全隐藏radio按钮的圆圈部分 */
.radio-option .el-radio__input.is-checked .el-radio__inner,
.radio-option .el-radio__input .el-radio__inner {
    display: none !important;
}

/* 隐藏radio按钮的原始样式 */
.radio-option .el-radio__input .el-radio__original {
    display: none !important;
}

/* 单选按钮组样式 */
.radio-option {
    display: block;
    width: 100%;
    margin-bottom: 8px;
    border: 2px solid #e4e7ed;
    border-radius: 8px;
    padding: 12px 16px;
    transition: all 0.3s ease;
    background: #fff;
    cursor: pointer;
    position: relative;
}

.radio-option:hover {
    border-color: #c6e2ff;
    background: #f0f8ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.1);
}

/* 选中状态样式 - 通过卡片样式变化显示选中状态 */
.radio-option .el-radio.is-checked + .radio-content::before,
.radio-option:has(.el-radio.is-checked),
.radio-option.selected {
    border-color: #409eff !important;
    background: linear-gradient(135deg, #e6f4ff 0%, #f0f8ff 100%) !important;
    box-shadow: 0 4px 16px rgba(64, 158, 255, 0.2) !important;
}

/* 添加选中指示器 */
.radio-option:has(.el-radio.is-checked)::after,
.radio-option.selected::after {
    content: "✓";
    position: absolute;
    top: 12px;
    right: 16px;
    color: #409eff;
    font-weight: bold;
    font-size: 16px;
    line-height: 1;
}

.radio-content {
    margin-left: 0px;
    margin-top: 0px;
    padding-left: 0px;
    width: 100%;
}

.radio-title {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2px;
    line-height: 1.2;
    margin-top: 0;
}

.radio-desc {
    font-size: 12px;
    color: #666;
    line-height: 1.2;
    margin-top: 1px;
}

/* 有效期设置样式 */
.expire-setting {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.expire-unit {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.clear-expire {
    color: #f56c6c;
    padding: 0;
    font-size: 12px;
}

.expire-tip {
    font-size: 11px;
    color: #909399;
    line-height: 1.2;
    padding: 4px 8px;
    background: #f0f9ff;
    border-radius: 4px;
    border: 1px solid #d4edda;
    margin-top: 2px;
}

/* 对话框按钮样式 */
.dialog-footer {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.cancel-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    border: 2px solid #dcdfe6;
    color: #606266;
    background: #fff;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    border-color: #c0c4cc;
    color: #409eff;
    background: #f5f7fa;
    transform: translateY(-1px);
}

.confirm-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    background: linear-gradient(135deg, #409eff 0%, #36a3f7 100%);
    border: none;
    box-shadow: 0 3px 8px rgba(64, 158, 255, 0.3);
    transition: all 0.3s ease;
}

.confirm-btn:hover {
    background: linear-gradient(135deg, #66b1ff 0%, #409eff 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(64, 158, 255, 0.4);
}

.confirm-btn.is-loading {
    background: linear-gradient(135deg, #a0cfff 0%, #79bbff 100%);
    transform: none;
    box-shadow: 0 2px 8px rgba(64, 158, 255, 0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .notify-config-dialog {
        width: 90vw !important;
        margin: 0 5vw;
    }
    
    .notify-config-dialog .el-dialog__body {
        padding: 15px;
        max-height: 55vh;
    }
    
    .notify-config-dialog .el-dialog__footer {
        padding: 12px 15px;
    }
    
    .store-preview {
        padding: 10px;
        gap: 10px;
    }
    
    .store-preview-icon {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .radio-option {
        padding: 10px;
    }
    
    .radio-content {
        margin-left: 18px;
    }
    
    .dialog-footer {
        flex-direction: column;
        gap: 8px;
    }
    
    .cancel-btn,
    .confirm-btn {
        width: 100%;
        padding: 10px;
    }
}

/* 全局 Dialog 优化样式 - 增强防止页面内容溢出 */
body .el-dialog__wrapper {
    overflow: hidden !important;
}

body .el-dialog {
    overflow: hidden !important;
    max-width: 95vw !important;
    margin: 0 auto !important;
}

body .el-dialog__body {
    word-wrap: break-word;
    word-break: break-all;
    overflow-wrap: break-word;
}

/* 对话框内容滚动条优化 */
.dialog-content::-webkit-scrollbar {
    width: 5px;
}

.dialog-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.dialog-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.dialog-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}